<%--
 * list.jsp
 *
 * Copyright (C) 2013 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

<%@taglib prefix="jstl"	uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="acme" tagdir="/WEB-INF/tags" %>

<display:table pagesize="5" class="displaytag" 
name="bids" requestURI="/bid/actor/list.do" id="row">
	
	<!-- Attributes -->
	
	<spring:message code="bid.moment" var="momentHeader" />
	<display:column property="moment" title="${momentHeader}" sortable="true" />
	
	<spring:message code="bid.money" var="moneyHeader" />
	<display:column property="money" title="${moneyHeader}" sortable="true"/>
	
	<security:authorize access="hasRole('CUSTOMER')">
		<jstl:if test="${aux == 1}">
			<display:column>
				<spring:message code="bid.choose" var="chooseMessage" />
				<input type="button" name="choose"
					value="${chooseMessage}"
					onclick="javascript: window.location.replace('auction/customer/chooseWinningBid.do?bidId=${row.id}&auctionId=${row.auction.id}')" />
			</display:column>
			
		</jstl:if>
	</security:authorize>
	
</display:table>